package com.wondersgroup.aida.base;

import com.wondersgroup.aida.tools.ModelUtil;
import dev.langchain4j.data.image.Image;
import dev.langchain4j.model.openai.OpenAiImageModel;
import dev.langchain4j.model.output.Response;

/**
 * @author: 紫麒麟vip
 * @create: 2025/2/15
 * Description:
 */
public class ImageDemo {
    public static void main(String[] args) {
        OpenAiImageModel model = OpenAiImageModel.builder()
                .baseUrl(ModelUtil.BASE_URI_OPENAI)
                .apiKey(ModelUtil.API_KEY_0PENAI)
                .build();

        Response<Image> response = model.generate("科幻色彩的未来建筑");
        System.out.println(response.content().base64Data());
    }
}
